﻿CREATE PROCEDURE [ServiceEngine].[GetPolicy]
	@ID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as PolicyID, N.[EntityName] as [Name], ET.EntityTypeID, N.EntityDescription as Description
	FROM	[ServiceEngine].Policies P
	JOIN	[ServiceEngine].Names N on N.[EntityID] = P.PolicyID and N.[EntityTypeID] = 8
	JOIN    [ServiceEngine].EntityTypes ET on ET.EntityTypeID = P.EntityTypeID
	WHERE	P.PolicyID = @ID
END


